<!--
 * @Author: wcc007
 * @Date: 2022-11-18 09:32:03
 * @LastEditors: wcc007
 * @LastEditTime: 2022-11-18 10:21:36
 * @Description: file content
 * @FilePath: \front-end-of-task-center\src\components\generator\form-extention\un-title\index.vue
-->
<template>
  <div :style="titleStyle" v-html="content"></div>
</template>

<script>
export default {
  name: "UnTitle",
  props: {
    content: String,
    isBold: {
      type: Boolean,
      default: true,
    },
    fontSize: {
      type: Number,
      default: 14,
    },
    align: String, // 对齐
    offset: Number, // 偏移
  },
  computed: {
    titleStyle() {
      return {
        fontSize: this.fontSize + "px",
        fontWeight: this.isBold ? 700 : 400,
        textAlign: this.align,
        paddingLeft: this.offset + "px",
        paddingRight: this.offset + "px",
        boxSizing: "border-box",
      };
    },
  },
};
</script>
